package com.huawei.appgallery.updatemanager.ui.cardkit.card;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.huawei.appgallery.foundation.ui.framework.widget.MaskImageView;
import com.huawei.appgallery.foundation.ui.framework.widget.button.FitWidthButton;
import com.huawei.appgallery.updatemanager.ui.cardkit.bean.UpdateRecordCardBean;
import huawei.widget.HwButton;
import o.azb;
import o.czi;
import o.czk$c;
import o.dba;
import o.epv;

public class IgnoreUpdateRecordCard extends UpdateRecordCard {
    private FitWidthButton ॱˎ;

    public IgnoreUpdateRecordCard(Context context) {
        super(context);
    }

    protected void ॱ(View view) {
        this.ॱˊ = (TextView) view.findViewById(czk$c.ʽ);
        this.ᐝ = (LinearLayout) view.findViewById(czk$c.ˉ);
        this.ᐝ.setOnClickListener(this);
        this.ॱॱ = (MaskImageView) view.findViewById(czk$c.ˎˎ);
        azb.ॱ(this.ॱॱ);
        azb.ˋ(view, czk$c.ॱᐝ);
        this.ॱॱ.setOnClickListener(this);
        this.ॱॱ.setCornerType(2);
        this.ॱॱ.ॱ(1);
        this.ˋॱ = (ImageView) view.findViewById(czk$c.ͺ);
        azb.ˋ(this.ˋॱ, epv.ᐝ(), azb.ˏ(this.ʼॱ));
        this.ͺ = (ImageView) view.findViewById(czk$c.ˏॱ);
        this.ʻ = (TextView) view.findViewById(czk$c.ॱॱ);
        this.ʼ = (TextView) view.findViewById(czk$c.ॱˊ);
        this.ˏॱ = (RelativeLayout) view.findViewById(czk$c.ᐝ);
        azb.ˋ(this.ˏॱ, epv.ᐝ(), azb.ˏ(this.ʼॱ));
        this.ˏॱ.setOnClickListener(this);
        ˊ((TextView) view.findViewById(czk$c.ˋॱ));
        this.ˊॱ = (TextView) view.findViewById(czk$c.ˏˏ);
        this.ॱˎ = (FitWidthButton) view.findViewById(czk$c.ˊ);
        this.ॱˎ.ॱ();
        this.ॱˎ.setOnClickListener(new OnClickListener(this) {
            final /* synthetic */ IgnoreUpdateRecordCard ˎ;

            {
                this.ˎ = r1;
            }

            public void onClick(View view) {
                this.ˎ.ˊ();
            }
        });
        this.ᐝॱ = (HwButton) view.findViewById(czk$c.ˊॱ);
        this.ᐝॱ.setOnClickListener(this);
    }

    protected void ˎ() {
        ˎ(this.ˋ);
        if (this.ˋ.ʹ()) {
            ˉ().setVisibility(0);
            ˏ(this.ˋ);
            this.ʻ.setText(this.ˋ.v_());
            ॱ(this.ˋ);
            ˋ(this.ˋ);
            return;
        }
        ˉ().setVisibility(8);
    }

    protected CharSequence ˊ(UpdateRecordCardBean updateRecordCardBean) {
        if (updateRecordCardBean == null) {
            return "";
        }
        return updateRecordCardBean.ॱ() == null ? "" : updateRecordCardBean.ॱ();
    }

    private synchronized void ˊ() {
        if (this.ˋ == null || TextUtils.isEmpty(this.ˋ.ॱـ())) {
            czi.ˎ.ˊ("IgnoreUpdateRecordCard", "cancelIgnoreUpdate, cardBean or packageName is null!");
        } else {
            dba.ॱ(this.ʼॱ, this.ˋ.ॱـ(), this.ˋ.v_());
        }
    }
}
